<?php
class BaseHandler {
	public $text;
	public static $session = NULL;
	public function __construct() {
		$this->text = '';
		if (self :: $session == NULL) {
			self :: $session = & getManager();
		}
	}

	public function startElement(& $parser, $tag, $attributes) { // echo 'abriendo  '.$tag.'<br>';
		$this->text = '';
	}

	public function characters(& $parser, $cdata) {
		$this->text .= $cdata;
	}

	public function endElement(& $parser, $tag) {
		$this->text = str_replace('&','&amp;',trim($this->text, " \t\n\r\0"));   
	}
}
?>